package itheima;

public class Demo6 {
    public static void main(String[] args) {
        int[] arr = {1, 2, 3, 4, 5, 6, 7};
        aarAry(arr);
    }

    public static void aarAry(int[] arr) {
        System.out.print("{");
        for (int i = 0; i < arr.length; i++) {
            if (i % 2 == 0) {
                arr[i] += 1;
            }
            if(i == arr.length - 1){
                System.out.println(arr[i] + "}");
            }else{
                System.out.print(arr[i] + ", ");
            }
        }

    }

}

